<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of VMT_DxDyfromLB</title>
  <meta name="keywords" content="VMT_DxDyfromLB">
  <meta name="description" content="Computes the x distance and y distance from the point on the left bank.">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2005 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../m2html.css">
  <script type="text/javascript">
    if (top.frames.length == 0) { top.location = "../index.html"; };
  </script>
</head>
<body>
<a name="_top"></a>
<!-- menu.html VMT_4.0_dev -->
<h1>VMT_DxDyfromLB
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>Computes the x distance and y distance from the point on the left bank.</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>function A = VMT_DxDyfromLB(z,A,V) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre class="comment"> Computes the x distance and y distance from the point on the left bank.
 Left bank is defined by the mean flow direction for the set of transects.

 P.R. Jackson, USGS, 1-21-09</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../matlabicon.gif)">
</ul>
This function is called by:
<ul style="list-style-image:url(../matlabicon.gif)">
</ul>
<!-- crossreference -->



<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function A = VMT_DxDyfromLB(z,A,V)</a>
0002 <span class="comment">% Computes the x distance and y distance from the point on the left bank.</span>
0003 <span class="comment">% Left bank is defined by the mean flow direction for the set of transects.</span>
0004 <span class="comment">%</span>
0005 <span class="comment">% P.R. Jackson, USGS, 1-21-09</span>
0006 
0007 <span class="comment">%V.mfd</span>
0008 <span class="comment">%V.m</span>
0009 
0010 <span class="keyword">if</span> V.mfd &gt;= 270 | V.mfd &lt; 90
0011     <span class="keyword">for</span> zi = 1 : z
0012         A(zi).Comp.dx = abs(V.xw-A(zi).Comp.xm);
0013         <span class="keyword">if</span> V.m &gt;= 0
0014             A(zi).Comp.dy = abs(V.ys-A(zi).Comp.ym);
0015         <span class="keyword">elseif</span> V.m &lt; 0
0016             A(zi).Comp.dy = abs(V.yn-A(zi).Comp.ym);
0017         <span class="keyword">end</span>
0018     <span class="keyword">end</span>
0019 <span class="keyword">elseif</span> V.mfd &gt;= 90 &amp; V.mfd &lt; 270
0020     <span class="keyword">for</span> zi = 1 : z
0021         A(zi).Comp.dx = abs(V.xe-A(zi).Comp.xm);
0022         <span class="keyword">if</span> V.m &gt;= 0
0023             A(zi).Comp.dy = abs(V.yn-A(zi).Comp.ym);
0024         <span class="keyword">elseif</span> V.m &lt; 0
0025             A(zi).Comp.dy = abs(V.ys-A(zi).Comp.ym);
0026         <span class="keyword">end</span>
0027     <span class="keyword">end</span>
0028 <span class="keyword">end</span>
0029 
0030 
0031 
0032</pre></div>
<hr><address>Generated on Thu 21-Mar-2013 09:32:01 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" target="_parent">m2html</a></strong> &copy; 2005</address>
</body>
</html>